package com.shareinfo.adminManage.auto.service.impl;

import java.sql.Connection;
import java.sql.DriverManager;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.shareinfo.adminManage.auto.dao.TableDao;
import com.shareinfo.adminManage.auto.model.AutoDbModel;
import com.shareinfo.adminManage.auto.service.TableService;
import com.shareinfo.auto.vo.ColumnInfo;
import com.shareinfo.auto.vo.ResultInfo;
import com.shareinfo.auto.vo.TableInfo;

/**
 * 
 * @author Administrator
 * 
 */
@Service("tableService")
public class TableServiceImpl implements TableService {

	@Resource(name = "tableDao")
	private TableDao tableDao;

	/**
	 * 判断数据库是否可以链接
	 */
	@Override
	public boolean ifCanConnection(){
		return tableDao.ifCanConnection();
	}
	
	@Override
	public void setAutoDbModel(AutoDbModel autoDbModel) {
		tableDao.setAutoDbModel(autoDbModel);
	}
	
	@Override
	public ResultInfo getAllTableList() {
		return tableDao.getAllTableList();
	}

	@Override
	public ResultInfo getTableInfo(String tableName) {
		return tableDao.getTableInfo(tableName);
	}

	@Override
	public ResultInfo getKeyColumn(String tableName) {
		return tableDao.getKeyColumn(tableName);
	}

	@Override
	public ResultInfo getColumns(String tableName) {
		return tableDao.getColumns(tableName);
	}
	
}
